<?php
/*
Auth:Sang
Desc:对一些常见mime类型的定义
Date:2014-11-01
*/
namespace Lib;
class Mimes{
	static function types(){
		return array( 
			'gif' => 'image/gif', 
			'jpg' => 'image/jpeg', 
			'jpeg'=> 'image/jpeg', 
			'jpe' => 'image/jpeg', 
			'bmp' => 'image/bmp', 
			'png' => 'image/png', 
			'tif' => 'image/tiff', 
			'tiff'=> 'image/tiff', 
			'pict'=> 'image/x-pict', 
			'pic' => 'image/x-pict', 
			'pct' => 'image/x-pict', 
			'tif' => 'image/tiff', 
			'tiff'=> 'image/tiff', 
			'psd' => 'image/x-photoshop', 

			'swf' => 'application/x-shockwave-flash', 
			'js'  => 'application/x-javascript', 
			'pdf' => 'application/pdf', 
			'ps'  => 'application/postscript', 
			'eps' => 'application/postscript', 
			'ai'  => 'application/postscript', 
			'wmf' => 'application/x-msmetafile', 

			'css' => 'text/css', 
			'htm' => 'text/html', 
			'html'=> 'text/html', 
			'txt' => 'text/plain', 
			'xml' => 'text/xml', 
			'wml' => 'text/wml', 
			'wbmp'=> 'image/vnd.wap.wbmp', 

			'mid' => 'audio/midi', 
			'wav' => 'audio/wav', 
			'mp3' => 'audio/mpeg', 
			'mp2' => 'audio/mpeg', 
			'avi' => 'video/x-msvideo', 
			'mpeg'=> 'video/mpeg', 
			'mpg' => 'video/mpeg', 
			'qt'  => 'video/quicktime', 

			'wmv' => 'video/x-ms-wmv', 
			'mov' => 'video/quicktime', 

			'lha' => 'application/x-lha', 
			'lzh' => 'application/x-lha', 
			'z'   => 'application/x-compress', 
			'gtar'=> 'application/x-gtar', 
			'gz'  => 'application/x-gzip', 
			'gzip'=> 'application/x-gzip', 
			'tgz' => 'application/x-gzip', 
			'tar' => 'application/x-tar', 
			'bz2' => 'application/bzip2', 
			'zip' => 'application/zip', 
			'arj' => 'application/x-arj', 
			'rar' => 'application/x-rar-compressed',
			'application/octet-stream',

			'hqx' => 'application/mac-binhex40', 
			'sit' => 'application/x-stuffit', 
			'bin' => 'application/x-macbinary', 

			'uu'  => 'text/x-uuencode', 
			'uue' => 'text/x-uuencode', 

			'latex'=> 'application/x-latex', 
			'ltx' => 'application/x-latex', 
			'tcl' => 'application/x-tcl', 

			'pgp' => 'application/pgp', 
			'asc' => 'application/pgp', 
			'exe' => 'application/x-msdownload', 
			'doc' => 'application/msword', 
			'rtf' => 'application/rtf', 
			'xls' => 'application/vnd.ms-excel', 
			'ppt' => 'application/vnd.ms-powerpoint', 
			'mdb' => 'application/x-msaccess', 
			'wri' => 'application/x-mswrite', 
		);
	}

	static function mimes(){
		return array (
	      'application/postscript' => 'eps',
	      'application/octet-stream' => 'exe',
	      'application/vnd.ms-word' => 'doc',
	      'application/vnd.ms-excel' => 'xls',
	      'application/vnd.ms-powerpoint' => 'pps',
	      'application/pdf' => 'pdf',
	      'application/xml' => 'xml',
	      'application/vnd.oasis.opendocument.text' => 'odt',
	      'application/x-shockwave-flash' => 'swf',
	      'application/x-gzip' => 'tgz',
	      'application/x-bzip2' => 'tbz',
	      'application/zip' => 'zip',
	      'application/x-rar' => 'rar',
	      'application/x-tar' => 'tar',
	      'application/x-7z-compressed' => '7z',
	      'text/plain' => 'txt',
	      'text/x-php' => 'php',
	      'text/html' => 'html',
	      'text/javascript' => 'js',
	      'text/css' => 'css',
	      'text/rtf' => 'rtf',
	      'text/rtfd' => 'rtfd',
	      'text/x-python' => 'py',
	      'text/x-java-source' => 'java',
	      'text/x-ruby' => 'rb',
	      'text/x-shellscript' => 'sh',
	      'text/x-perl' => 'pl',
	      'text/x-sql' => 'sql',
	      'image/x-ms-bmp' => 'bmp',
	      'image/jpeg' => 'jpg',
	      'image/gif' => 'gif',
	      'image/png' => 'png',
	      'image/webp' => 'webp',
	      'image/tiff' => 'tiff',
	      'image/x-targa' => 'tga',
	      'image/vnd.adobe.photoshop' => 'psd',
	      'audio/mpeg' => 'mp3',
	      'audio/midi' => 'mid',
	      'audio/ogg' => 'ogg',
	      'audio/mp4' => 'mp4a',
	      'audio/wav' => 'wav',
	      'audio/x-ms-wma' => 'wma',
	      'video/x-msvideo' => 'avi',
	      'video/x-dv' => 'dv',
	      'video/mp4' => 'mp4',
	      'video/mpeg' => 'mpg',
	      'video/quicktime' => 'mov',
	      'video/x-ms-wmv' => 'wm',
	      'video/x-flv' => 'flv',
	      'video/x-matroska' => 'mkv',
	    );
	}
}